import styles from './index.css';
import {connect} from 'dva'
import {Button, Badge} from 'antd'

function BasicLayout(props) {
  return (
    <div className={styles.normal}>
      <p>一级路由</p>
      <Badge count={props.n}>
        <Button onClick={()=>props.dispatch({type: 'count/cnodeFunc',payload:2})}>Model计数</Button>
      </Badge>
      {props.children}
    </div>
  );
}

const mapStateToProps = state => {
  return {n: state.count.n}
}
export default connect(mapStateToProps)(BasicLayout);
